GXSetViewPortMapping
You can use theGXSetViewPortMapping
function to assign a mapping to a view port object.
void GXSetViewPortMapping(gxViewPort target, const gxMapping *map);
target
- A reference to the view port object you want to assign the mapping to.
map
- A pointer to a mapping structure containing the mapping matrix to assign to the target view port.
DESCRIPTION
TheGXSetViewPortMapping
function copies information from the mapping structure pointed to by themap
parameter into the mapping property of the target view port.You can specify
nil
for themap
parameter, in which case this function sets the mapping property of the target view port as follows:
You can provide arbitrary values for the elements of the mapping structure pointed to by the
- If the clip shape is a full shape, which specifies no clipping, the function sets the mapping property to the identity mapping.
- If a clip exists, the function sets the mapping's translation component to the upper-left corner of the clip. It sets the other components of the mapping to identity.
map
parameter, with one exception: the lower-right element of the matrix (element [2][2]) may not be 0.ERRORS, WARNINGS, AND NOTICES
Errors invalid_viewPort_reference viewPort_is_a_window (debugging version) SEE ALSO
For examples of the use of this function, see Listing 7-3 on page 7-45 and Listing 7-5 on page 7-47.To get a view port's mapping, use the
GXGetViewPortMapping
function, described in the previous section.For information about the
gxMapping
structure, see the mathematics chapter of Inside Macintosh: QuickDraw GX Environment and Utilities.